<style>
	.mapView{
		padding:13px;
		background: #FFFFFF;
		border-radius: 3px;
	}
	
	@media screen and (min-width: 980px) and (max-width: 1760px) {
		.listView {
			width: 25%;
		}
		.mapView {
			width: 75%;
		}
	}
	
	.selectView{
	    background: white;
	    padding: 10px 0;
	    /*width: 99.5%;*/
	    border-radius: 3px;
	    min-height: 200px;
	    margin-bottom: 20px;
	}
	.hideCar{
		display: none;
	}
	.module_inp{
		padding: 0 6px;
	}
</style>

<div id="content">
	<div class="row s_page_title y_map_title">
		<sa-big-breadcrumbs [items]="['车辆定位管理','历史查询']" icon="fa fa-car" class="col-xs-12 col-sm-7 col-md-7 col-lg-4"></sa-big-breadcrumbs>
	</div>
	<div style="" id='wrap'> 
		<div  class="col-xs-12 col-sm-6 col-md-3 no-padding">
			<car-trees (outerSend)="getCartreeMess($event)"></car-trees>
		</div>
		<div class="col-xs-12 col-sm-6 col-md-9 treeRight map-box" style="background: white;">
			<div id="baiduMap" class="bmap-map"></div>
			<sa-bmap-tools [baiduMap]="myMap" [isShowCity]="false"></sa-bmap-tools>
		</div>
	</div>
	<div class="col-xs-12 selectView">
		<div  class="col-xs-12">
			<sa-widgets-grid>
				<div class="s_table">
					<div sa-widget [editbutton]="false" color="darken" class="clearfix">
						<header><span class="widget-icon"> <i class="fa fa-table"></i> </span><h2>数据查询</h2></header>
						<div>
							<div class="widget-body no-padding">
								<div class="page-header clearfix s_table_opreation">
									<div class="left page-header-btn">
										
										<div class="top_module">
											<span class="module_text">车牌号</span>
											<input  class="module_inp"  type="text"  [(ngModel)]="carNumber" placeholder="车牌号" />
										</div>
										
										<div class="top_module">
											<span class="module_text">设备ID</span>
											<input  class="module_inp"  type="text"  [(ngModel)]="deviceId" placeholder="设备ID" />
										</div>
										
										<div class="selectDate top_module">
											<div class="input-daterange input-group s_selected_time_box s_hover_box">
												<input type="text" class="form-control s_selected_time" id="datetimepicker1"  autocomplete="off" placeholder="选择开始时间"/>
												<span class="s_selected_time_spe">至</span>
												<input type="text" class="form-control s_selected_time" id="datetimepicker2"  autocomplete="off" placeholder="选择结束时间"/>
												<!--<div class="s_del_icon">x</div>-->
											</div>
										</div>
										
										<div class="top_module">
											<span class="module_text">时间间隔</span>
											<input  class="module_inp"  type="text"  [(ngModel)]="spaceTime"  />
										</div>
										
										<button type="button" class="btn btn-primary" (click)="table_search()">查询</button>
										<button type="button" class="btn btn-primary" (click)="exprotCarData()">导出</button>
									</div>
								</div>
								
								<div class="table_scroll">
									<table class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
										<thead>
											<tr>
												<th>时间</th>
												<th>速度(Km/h)</th>
												<th>载重量</th>
												<th *ngIf='downloadADValue'>ACH1</th>
												<th *ngIf='downloadADValue'>ACH2</th>
												<th *ngIf='downloadADValue'>ACH3</th>
												<th *ngIf='downloadADValue'>ACH4</th>
												<th *ngIf='downloadADValue'>ACH5</th>
												<th *ngIf='downloadADValue'>ACH6</th>
											</tr>
										</thead>
										<tbody>
											<tr *ngFor="let row of resultTableData">
												<td>{{row.uploadDate}}</td>
												<td>{{row.speed}}</td>
												<td>{{row.weight}}</td>
												<td *ngIf='downloadADValue'>{{row.ACH1}}</td>
												<td *ngIf='downloadADValue'>{{row.ACH2}}</td>
												<td *ngIf='downloadADValue'>{{row.ACH3}}</td>
												<td *ngIf='downloadADValue'>{{row.ACH4}}</td>
												<td *ngIf='downloadADValue'>{{row.ACH5}}</td>
												<td *ngIf='downloadADValue'>{{row.ACH6}}</td>
											</tr>
										</tbody>
									</table>
								</div>
								<div class="table-fix clearfix">
									<paginator [totalRecords]="totalCount" [rows]="pageSize" [currentPage]="curPage - 1" (onPageChange)="paginate($event)">
									</paginator>
									<button type="button" class="btn default refresh_btn" (click)="refresh()"><i class="fa fa-refresh"></i></button>
								</div>
							</div>
						</div>
					</div>
				</div>
			</sa-widgets-grid>
		</div>
	</div>

	<div id="exportDiv" class="col-xs-12" style="padding:20px 20px 40px 20px;" *ngIf="isExpor">
		<div class="col-xs-2" style="font-size:14px;color:#393939;font-size: 16px;padding: 14px 0px;">
			<div id="exportMessage">数据导出成功</div>
		</div>
		<div class="col-xs-2" style="font-size:14px;">
			<!--<a *ngIf="isload" id="exportUrl" class="btn btn-success" href="{{exportUrl}}" target="_brank">
				<i class="ace-icon fa fa-floppy-o bigger-160"></i>点击下载
			</a>-->
			<a *ngIf="isload" id="exportUrl" class="btn btn-success" (click)='loadFile()' target="_brank">
				<i class="ace-icon fa fa-floppy-o bigger-160"></i>点击下载
			</a>
		</div>
		 <iframe id="iframeFile" style="display:none"></iframe>
	</div>

</div>
